package com.gadgets.cm01.common;

import com.gadgets.framework.common.constant.GadgetsConstant;
import com.gadgets.framework.common.util.DigestUtil;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-09-17
 *
 */
public class GadgetsCm01Constant {
    /**
     * 登录
     */
    public static final String LOGIN_OPER_LOGININ = GadgetsConstant.NUMBER_CONSTANT.STR_NUMBER_0;
    /**
     * 登出
     */
    public static final String LOGIN_OPER_LOGINOUT = GadgetsConstant.NUMBER_CONSTANT.STR_NUMBER_1;
    /**
     * 用户号序列
     */
    public static final String USER_NO_SEQ_NAME = "userSeq";
    /**
     * 初始化密码密文串
     */
    public static final String INIT_PWD_DIGEST = DigestUtil.digestBySHA2_512("123456");



    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-17
     *
     */
    public static class USER_STATUS {
        /**
         * 初始化
         */
        public static final int USER_STATUS_INIT = GadgetsConstant.NUMBER_CONSTANT.NUMBER_0;
        /**
         * 激活
         */
        public static final int USER_STATUS_ACTIVE = GadgetsConstant.NUMBER_CONSTANT.NUMBER_1;
        /**
         * 冻结
         */
        public static final int USER_STATUS_FROZEN = GadgetsConstant.NUMBER_CONSTANT.NUMBER_2;
        /**
         * 注销
         */
        public static final int USER_STATUS_DESTORY = GadgetsConstant.NUMBER_CONSTANT.NUMBER_3;
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-17
     *
     */
    public static class USER_STATUS_OPER_TYPE {
        /**
         * 增加密码错误次数
         */
        public static final int ADD_PWD_ERROR_TM = GadgetsConstant.NUMBER_CONSTANT.NUMBER_1;
        /**
         * 重置密码错误次数
         */
        public static final int RESET_PWD_ERROR_TM = GadgetsConstant.NUMBER_CONSTANT.NUMBER_2;
        /**
         * 状态变更-冻结用户
         */
        public static final int FROZEN_STATUS_CHANGE = GadgetsConstant.NUMBER_CONSTANT.NUMBER_3;
        /**
         * 状态变更-解冻用户
         */
        public static final int UNFROZEN_STATUS_CHANGE = GadgetsConstant.NUMBER_CONSTANT.NUMBER_4;
        /**
         * 状态变更-注销用户
         */
        public static final int UNLOAD_STATUS_CHANGE = GadgetsConstant.NUMBER_CONSTANT.NUMBER_5;
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-10-10
     *
     */
    public static class ROLE_AUTH_OPER_TYPE{
        /**
         * 分配权限
         */
        public static final String ALLOCATION = GadgetsConstant.NUMBER_CONSTANT.STR_NUMBER_0;
        /**
         * 收回权限
         */
        public static final String REALLOCATION = GadgetsConstant.NUMBER_CONSTANT.STR_NUMBER_1;
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-17
     *
     */
    public static class USER_PWD_OPER_TYPE {
        /**
         * 重置用户密码
         */
        public static final int RESET_PWD = GadgetsConstant.NUMBER_CONSTANT.NUMBER_1;
        /**
         * 更新用户密码
         */
        public static final int CHANGE_PWD = GadgetsConstant.NUMBER_CONSTANT.NUMBER_2;
        /**
         * 激活用户
         */
        public static final int ACTIVE_USER = GadgetsConstant.NUMBER_CONSTANT.NUMBER_3;
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-17
     *
     */
    public static class CM01_STATUS_CODE {
        /**
         * 用户状态变更状态机码
         */
        public static final String UPDATE_STATUS_MACHIN_CODE = "CM010001";
    }

    public static void main(String[] args) {
        System.out.println(DigestUtil.digestBySHA2_512("qjywhpjsyb1b"));
    }

}
